import { Node, _decorator } from 'cc';
import XVirtualScrollView from '../core/list/XVirtualScrollView';
import { PageBase } from '../core/page/PageBase';
const { ccclass, property } = _decorator;

@ccclass('Page1')
export class Page1 extends PageBase {

    private _list: Node;

    start() {
        var datas: string[] = [];
        for (var i = 0; i < 100; i++) {
            datas.push(i + "");
        }
        //
        this._list = this.node.getChildByName('list');
        let sv: XVirtualScrollView = this._list.getComponent(XVirtualScrollView);
        sv.refreshData(datas);
    }

    update(deltaTime: number) {

    }
}

